import { waitMills } from './mockutils';

export default {
  'POST /api/login': async (req, res) => {
    await waitMills(500);
    if (req.body.username === 'admin') {
      res.json({ success: true });
    } else {
      res.json({ success: false, message: '用户名或密码错误' });
    }
  },

  'POST /api/logout': { success: true },

  'POST /api/fetchLoginUser': {
    success: true,
    data: {
      id: 1,
      username: 'admin',
      name: '管理员',
      //authority: [],
    },
  },

  'POST /api/changePwd': { success: true },
};
